package com.geralt.im.controller;

import com.geralt.im.command.Command;
import com.geralt.im.commandparse.impl.RpParser;
import com.geralt.im.protocol.Response;

public class Controller {
private static Controller controller;
	
	private Controller(){
		
	}
	public static Controller getInstance(){
		if(controller==null){
			controller=new Controller();
		}
		return controller;
	}
	
	public void excute(Response response){
		Command command = RpParser.getInstance().parse(response);
//		System.out.println("Controllor "+command);
		command.excute();
		
	}
}
